import json

from ronglian_sms_sdk import SmsSDK

accId = '2c94811c936de29c019370537a680038'
accToken = 'e52d0277cbde4e0091565a76fe265e04'
appId = '2c94811c936de29c01937057b029006b'

def send_message(phone,code):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = phone
    datas = (code,)
    resp = json.loads(sdk.sendMessage(tid, mobile, datas))
    if resp['statusCode'] == '000000':
        return True
    else:
        return False